package com.example.week9.service;

import com.example.week9.domain.Book;
import com.example.week9.domain.MyPage;
import com.example.week9.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookService implements IBookService{

    @Autowired
    private BookMapper bookMapper;

    public MyPage<Book> selectAllList(){
        List<Book> bookList = bookMapper.selectAllList();
        MyPage<Book> bookMyPage=new MyPage<>(bookList);
        bookMyPage.setTotal(100);
        return bookMyPage;
    }
}
